﻿<!DOCTYPE html>
<html lang="en">
<head>
	<meta charset="UTF-8">
	<title>中国地图</title>
</head>
<body><div id="map" style="width:800px;height: 500px;"></div>
<script src="https://img.hcharts.cn/highmaps/highmaps.js"></script>
<script src="https://data.jianshukeji.com/geochina/china.js"></script>
<script>
// 随机数据
var data = [{"name":"北京","value":23},{"name":"天津","value":51},{"name":"河北","value":64},{"name":"山西","value":53},{"name":"内蒙古","value":90},{"name":"辽宁","value":50},{"name":"吉林","value":93},{"name":"黑龙江","value":87},{"name":"上海","value":12},{"name":"江苏","value":23},{"name":"浙江","value":48},{"name":"安徽","value":39},{"name":"福建","value":43},{"name":"江西","value":71},{"name":"山东","value":33},{"name":"河南","value":33},{"name":"湖北","value":36},{"name":"湖南","value":26},{"name":"广东","value":94},{"name":"广西","value":58},{"name":"海南","value":74},{"name":"重庆","value":3},{"name":"四川","value":23},{"name":"贵州","value":74},{"name":"云南","value":61},{"name":"西藏","value":81},{"name":"陕西","value":79},{"name":"甘肃","value":82},{"name":"青海","value":32},{"name":"宁夏","value":88},{"name":"新疆","value":5},{"name":"台湾","value":100},{"name":"香港","value":44},{"name":"澳门","value":59},{"name":"南海诸岛","value":76},{"name":"南海诸岛","value":91}];
// 初始化图表
var map = new Highcharts.Map('map', {
  title: {
    text: '中国地图'
  },
  colorAxis: {
    min: 0,
    minColor: 'rgb(255,255,255)',
    maxColor: '#006cee'
  },
  series: [{
    data: data,
    name: '随机数据',
    mapData: Highcharts.maps['cn/china'],
    joinBy: 'name' // 根据 name 属性进行关联
  }]
});
</script></body></html>